//
//  NSArray+mapUsingBlock.m
//  SAYAKA_Table
//
//  Created by numanuma08 on 2013/07/20.
//  Copyright (c) 2013年 勘米良. All rights reserved.
//

#import "NSArray+mapUsingBlock.h"

@implementation NSArray (mapUsingBlock)
- (NSArray*)mapUsingArray:(id (^)(id))block
{
    NSMutableArray* resultArray = [NSMutableArray array];

    [self enumerateObjectsUsingBlock:^(id object, NSUInteger index, BOOL* isStop){
        id newObject = block(object);
        [resultArray addObject:newObject];
    }];
    
    return resultArray;
}
@end
